包子漫画[画].js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. var rule = {
  2. 类型: '漫画',//影视|听书|漫画|小说
  3. title: '包子漫画[画]',
  4. host: 'https://godamh.com/',
  5. url: 'fyclass/page/fypage',
  6. searchUrl: '/s/**?page=fypage',
  7. searchable: 2,
  8. quickSearch: 0,
  9. filterable: 1,
  10. filter: '',
  11. filter_url: '',
  12. filter_def: {},
  13. headers: {
  14. 'User-Agent': 'MOBILE_UA',
  15. },
  16. timeout: 5000,
  17. class_name: '全部',
  18. class_url: '/manga',
  19. class_parse: '.homenavtax&&a;a&&Text;a&&href;(/manga.*-.*)',
  20. cate_exclude: '',
  21. play_parse: true,
  22. lazy: $js.toString(() => {
  23. log(input);
  24. let _id = input.split('@@')[0];
  25. let _url = input.split('@@')[1];
  26. //let mid = _url.split('/').slice(-1)[0].split('-')[0];
  27. let html1 = request(_url, {headers: {Referer: 'https://godamh.com/'}});
  28. let mid = pdfh(html1, '#chapterContent&&data-ms');
  29. let html = request(`https://api-get.mgsearcher.com/api/chapter/getinfo?m=${mid}&c=${_id}`, {headers: {Referer: 'https://godamh.com/'}});
  30. let json = JSON.parse(html);
  31. let re = '@Referer=https://godamh.com/';
  32. let imgs = json.data.info.images.map(it => it.url + re);
  33. //log(imgs);
  34. input = {url: 'pics://' + imgs.join('&&')};
  35. }),
  36. double: true,
  37. 推荐: '.cardlist;.pb-2;*;*;*;*',
  38. 一级: '.cardlist&&.pb-2;.cardtitle&&Text;img&&src;;a&&href',
  39. 二级: {
  40. 重定向: $js.toString(() => {
  41. log('执行重定向:' + MY_URL);
  42. // let html = request(MY_URL);
  43. MY_URL = pd(html, '#morechap&&a&&href', MY_URL);
  44. log('二级重定向到:' + MY_URL);
  45. html = request(MY_URL);
  46. }),
  47. title: 'h1&&Text',
  48. img: 'img&&src',
  49. desc: '#lastchap&&Text',
  50. content: 'p.text-medium&&Text',
  51. tabs: 'h2.text-medium',
  52. lists: $js.toString(() => {
  53. //log(input);
  54. let data_id = pdfh(html, '#allchapters&&data-mid');
  55. //log(data_id);
  56. let html1 = request(`https://api-get.mgsearcher.com/api/manga/get?mid=${data_id}&mode=all`, {headers: {Referer: 'https://godamh.com/'}});
  57. let json = JSON.parse(html1);
  58. //log(json);
  59. let list1 = [];
  60. let url_prefix = input.replace('chapterlist', 'manga');
  61. json.data.chapters.forEach(it => {
  62. let _tt = it.attributes.title;
  63. let _slug = it.attributes.slug;
  64. let _id = it.id;
  65. list1.push(_tt + '$' + _id + '@@' + url_prefix + '/' + _slug);
  66. });
  67. LISTS = [list1];
  68. }),
  69. tab_text: 'body&&Text',
  70. list_text: 'body&&Text',
  71. list_url: 'a&&href',
  72. list_url_prefix: '',
  73. },
  74. 搜索: '*',
  75. }